package cn.com.api.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiTmember;
import cn.com.api.entity.ApiU_advert;
import cn.com.api.entity.ApiU_advert_resource;
import cn.com.api.entity.ApiU_bonus;
import cn.com.api.service.base.U_advertServiceBase;
import cn.com.util.PageInfo;

/**
 * 
 */
@Service
public interface ApiU_advertService extends U_advertServiceBase {

	// 根据广告位ID，获取首页或Banner广告
	// public List<ApiU_advert> findU_advertByPostionID(Integer position_id,
	// PageInfo page);
	public List<ApiU_advert> findU_advertByPostionID(String user_id, Integer position_id, PageInfo page);

	// 根据广告位ID，获取红包广告
	// public List<ApiU_advert> findBonus_AdvertByPostionIDListPage(Integer
	// position_id, String user_id, PageInfo page);
	public List<ApiU_advert> findBonus_AdvertByPostionIDListPage(Map<String, Object> params, PageInfo page);

	// 更新广告点击次数
	public void addClickTimes(Integer advert_id);

	// 模糊查询红包广告
	public List<ApiU_advert> findBonusU_advertByWords(String keyword, String user_id, PageInfo page);

	// 喊红包
	public List<ApiU_advert> findCallBonusU_advert(String keyword, String user_id, Integer type, PageInfo page);

	// 添加
	public int U_advertInsertion(ApiU_advert u_advert);

	// 根据收藏类型获取收藏列表
	public List<ApiU_advert> findAdvertListByFavoriteType(String user_id, Integer type, PageInfo page);

	// 查询广告
	public List<Map<String, String>> findU_adverts_infos(Map<String, Object> map);

	// 根据广告ID获取广告图片或视频
	public List<ApiU_advert_resource> findU_advert_resourceByAdvertID(String advertID, String user_id);

	// 创建现场红包广告
	public Integer createCallBonus_Advert(Map<String, String> params);

	// 确认现场广告红包，返回訂單編號
	public String comfirmCallBonus_Advert(Map<String, String> params) throws Exception;

	// 用户发的现场红包广告列表
	public List<ApiU_advert> findCallBonusU_advertByUserID(String user_id, PageInfo page);

	// 更新现场红包广告
	public Integer updateCallBonus_Advert(Map<String, String> params);

	public ApiU_advert findAdvertsInfoByMap(Map<String, Object> map);

	public List<ApiU_advert> findAdvertInfos(Map<String, Object> map);

	public String createCallBonus_Advert_Full(Map<String, String> params);

	public ApiU_advert updateCallBonus_Advert_Repay(Map<String, String> params);

	// 取消现场广告红包
	public int cancelCallBonus_Advert(Map<String, String> params);

	// 创建普通红包
	public Map<String, Object> createNomalBonus(Map<String, String> params);

	// 创建位置广告
	public Map<String, Object> create_advert_positionadvert(ApiTmember apiTmember, ApiU_advert u_advert)
			throws Exception;

	// 查询我的位置广告
	public List<ApiU_advert> getMyAdvertInfos(Integer cid, PageInfo pageInfo) throws Exception;

	// 删除广告
	public void deleteAdvertInfo(Integer advertid) throws Exception;
	
	//获取我的嗨红包列表
	public List<ApiU_advert> getMyHaiBonusList(String user_id, PageInfo page);
}
